package com.example.mapper;


import com.example.pojo.TempUser;
import org.apache.ibatis.annotations.*;

@Mapper
public interface TempUserMapper {

    //插入
    @Insert("INSERT INTO temp_user (username, password,email) VALUES (#{username}, #{password},#{email})")
    int insertTempUser(TempUser user);

    //通过账号获取
    @Select("SELECT * FROM temp_user WHERE username = #{username}")
    TempUser findUsername(String username);

    //删除临时用户
    @Delete("DELETE FROM temp_user WHERE username = #{username}")
    int deleteTempUser(String username);
}
